use std::ptr::NonNull;



pub fn new_bytes(len: usize) -> Box<[u8]> {
    let mut buf = Vec::with_capacity(len);
    unsafe {
        buf.set_len(len);
        buf.into_boxed_slice()
    }
}

#[inline]
pub fn get_mut<T>(value: &T) -> &mut T {
    unsafe {
        NonNull::new_unchecked(value as * const T as * mut T).as_mut()
    }
}


